home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
comm
/
term
/
dshrexx1_0.lha
/
dshrexx.doc
< prev
next >
Wrap
Text File
|
1993-09-22
|
6KB
|
186 lines
DSHREXX - Quick docs:
what does this thing do?
~~~~~~~~~~~~~~~~~~~~~~~~
it opens a terminal on dnet with a simple arexx & shell interface ie
dshrexx
will run the program with no options and accept input/output from the
shell it was invoked from/in.
Why have such a thing?
~~~~~~~~~~~~~~~~~~~~~~
Shells such as sphinx & wshell have nice history & command entering
facilities so as a shell-term this is quite useful. Also over slow
lines command line editing is a major pain, but not with this, as
normally the shell buffers the lines and so your amiga does all the
editing of lines, command line history etc etc...
An arexx script may be started that reads lines (or chars) from a
particular dshrexx term so you can have an auto-talk or whatever.
It would be nice if someone could write some scripts to do stuff
& post them?
What does it require?
~~~~~~~~~~~~~~~~~~~~~
Dnet to be installed & running
Amiga computer of some kind
Something to dnet the amiga to (eg
When running
~~~~~~~~~~~~
When running CTRL-F will let you enter commands/options
In this version this is a little sloppy but works ok.
eg if you did the following
dshrexx
[It logs you in or connects]
you hit CTRL-F
[dshrexx blah blah]
you type ? <return>
it gives you a list of commands such as
? or HELP ((This message))
R or RAW ((Raw (normal terminal) mode))
B or BUF ((Line buffered (shell) mode))
LFCR ((Linefeed & Carriage Return))
LF ((Linefeed))
CR ((Carriage return))
SEND (text)
SEND2 (text (without LF/CR))
F or FLUSH ((Flush input))
etc
the first UPPERCASE word is the accepted abbreviation, while the second
(if there is one) on the same line is the full command name. Following this
is a lowercase word indicating the argument that should be supplied
and then in ()'s is a short description
eg
<CTRL-F> CONSOLE window
means you should enter something like
<CTRL-F> CONSOLE con:0/0/600/100/dnet-shell
or if you have sphinx installed
<CTRL-F> CONSOLE sphinx:0/0/600/100/dnet-shell
or if you have wshell installed
<CTRL-F> CONSOLE cn1:0/0/600/100/dnet-shell
Running the program:
~~~~~~~~~~~~~~~~~~~~
note that you can
run dshrexx
but to kill it you will have to do a
status
to see which is process it ran as and then
break process_number F
break process_number D
(2 breaks are required in that sequence)
How to pass arguments
~~~~~~~~~~~~~~~~~~~~~
the first 3 arguments must be in the following order
dshrexx PORTNUMBER NETWORKNUMBER REXXPORTNAME
the PORTNUMBER defaults to 8195 when NONE are specified (note that you can not
specify a NETWORKNUMBER without a PORTNUMBER before it, likewise for REXXPORTNAME)
after the intial 3, arguments may appear in any order.
The arguments it accepts are the same as those you type after you press CTRL-F
so yu could for example do this:
run dshrexx 8195 0 DNETREXX "console con:0/0/640/100/Yeahh" "send stty -echo\n"
will open the input/output window on con:blah-blah,
send the string "stty -echo" (with a <return>) and then give control to the user.
notice that the arguments to the command and the command itself must be
in ""'s. This is how the program seperates the commands.
Run the program to get a list of commands
note that \n & \r expand to Linefeed & Carriage return respectively so
<returns> can be placed in the command line (or when you hit control F
and enter a command)
also %s & %r both expand to the arexx port name this dshrexx is using
eg
dshrexx
<CTRL-F>x echo %r
will output the name of the arexx port that terminal is using.
ARexx Support
~~~~~~~~~~~~~
At the moment this is a little limited
The port name is default DNETREXX.01 (actually it is DNETREXX.nn where nn
is the next free port number, so if you have several dshrexx's with the
same arexx port name then they will end with nn = 01, nn = 02, nn = 03,
etc). The command line port name is not really honored if specified either.
eg
dshrexx 8195 0 DREXX
then the port actually opened will be DREXX.01 if there was no other
program which opened a port called DREXX.01 (otherwise it will be DREXX.02
or DREXX.03 etc or what ever is the first non used number).
you should always specify
options results
in your arexx program if you want stuff from dshrexx
All of the above commands that can be used in the command line may be sent,
with a result either being what would be normally printed to the screen
(eg in the case of 'LOG ram:xxx' a 'ok: ram:xxx' would be returned if everything
went ok (otherwise an error))
Note that when using send or send2, no linefeed is appended, so when you call
send your string should contain an explicit '0a'x on the end
eg
'send echo "hello there people"' '0a'x
2 extra commands have been included for arexx which can't be entered otherwise
they are the
GETCHAR & GETLN
they return the next character or line received.
Everything received by the term is buffered for a default of 1K so lines or
characters will not be lost between getchar's or getln's unless the buffer
is totally filled (then the oldest ones are overwritten).
eg
getln
say 'the line received was' result
See the example program on how to use...
Bugs:
~~~~~
o I don't think vi will work with the arrow keys in RAW mode (but hjkl work)
o doesn't kick out of raw mode!! (ARRGGG!) can do a CONSOLE to remove
o Arexx support is lowly & more or less inefficient
o Needs to have extra commands to flush buffer, start buffer etc
o Bad docs... (sorry) Dunno how to make something into amigaguide either...
o I couldn't bebothered to lharc up the source so no source this time round
Any comments, please email to
c9107253@mystra.newcastle.edu.au
feed back appreciated...
- Darrell